﻿
namespace Huirui.Cavan.Presentation.Seedwork
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.Contracts;
    using System.Linq;
    using Huirui.Cavan.Core.Persistent;

    public interface IEntityModel<out T, TID, out TSearch> : IEntityModel<T, TSearch>
        where T : class, IPersistentObject
        where TSearch : class, ISearch<TID> { }

    public interface IEntityModel<out T, out TSearch> : IWebModel, ISearchModel<TSearch>
        where T : class, IPersistentObject
        where TSearch : class,ISearch
    {
        /// <summary>
        ///     Current Entity Item used on Detail, New and Edit
        /// </summary>
        T Item { get; }
    }
}